-
Notifications
You must be signed in to change notification settings - Fork 557
build(client): Tag asserts for release 2.62.0 #25575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR tags assert statements for release 2.62.0 by updating assert calls to use hexadecimal error codes instead of string messages. The changes also remove old assert error messages from the short codes map that are no longer used and add new assert error messages that correspond to the newly tagged assertions.
- Updates assert statements to use hexadecimal error codes for better tracking and consistency
- Removes unused assert error messages from the shortCodeMap
- Adds new assert error messages that correspond to the newly tagged assertions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts | Updates shortCodeMap by removing unused entries and adding new assert error codes |
| packages/dds/tree/src/shared-tree/treeCheckout.ts | Updates assert to use hex code 0xc55 for transaction branch switching check |
| packages/dds/tree/src/shared-tree/treeAlpha.ts | Updates assert to use hex code 0xc54 for leaf value validation |
| packages/dds/tree/src/shared-tree-core/sharedTreeCore.ts | Updates asserts to use hex codes 0xc67 and 0xc68 for commit rollback and branch registration |
| packages/dds/tree/src/shared-tree-core/messageCodecV5.ts | Updates assert to use hex code 0xc66 for commit message revision validation |
| packages/dds/tree/src/shared-tree-core/messageCodecV1ToV4.ts | Updates asserts to use hex codes 0xc64 and 0xc65 for message type validation |
| packages/dds/tree/src/shared-tree-core/editManagerCodecsV5.ts | Updates asserts to use hex codes 0xc61, 0xc62, and 0xc63 for summary encoding validation |
| packages/dds/tree/src/shared-tree-core/editManagerCodecsCommons.ts | Updates asserts to use hex codes 0xc5e, 0xc5f, and 0xc60 for branch encoding/decoding validation |
| packages/dds/tree/src/shared-tree-core/editManager.ts | Updates asserts to use hex codes 0xc56-0xc5d for branch management validation |
| packages/dds/tree/src/core/rebase/utils.ts | Updates assert to use hex code 0xc69 for branch relationship validation |
| "0xabe": "Child changes must be in order.", | ||
| "0xabf": "Duplicate codecs specified.", | ||
| "0xac0": "Encoded schema should validate", | ||
| "0xac1": "Encoded schema should validate", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still in use: it should not have been removed. Looks like assert tagging might have been broken for fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tree has a config in assertTagging.config.mjs which should enable assert tagging for fail, but it seems like that broke. We should look at what changes were made to the assert taking implementation recently. Was there a update to build tools integrated recently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run tagging it works fine for me.
How did you perform this tagging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used pnpm run policy-check:asserts which functioned correctly.
When doing automated changes like this, it's good to include how you did it in the PR description so that can be checked for issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My version, with a workaround for the failing test, is in #25580
build(client): Tag asserts for release 2.62.0